dom ready js

114

javascript run document ready -

document.addEventListener("DOMContentLoaded", function(event) { 
  //do work
});

js ready -

// without jQuery (doesn't work in older IEs)
document.addEventListener('DOMContentLoaded', function(){ 
    // your code goes here
}, false);

Comments

Submit
0 Comments